package com.cqc.fragmentreplace.fragment;

import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.support.v4.widget.SwipeRefreshLayout;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import com.cqc.fragmentreplace.util.LogUtil;
import com.cqc.fragmentreplace.R;

/**
 * Created by shuangzhi on 2016/9/6.
 */
public class Frag2 extends Fragment {

    private View view;

    @Override
    public void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        LogUtil.d("Frag2,onCreate");
    }

    @Nullable
    @Override
    public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
        view = inflater.inflate(R.layout.frag2, container, false);
        LogUtil.d("Frag2,onCreateView");
        return view;
    }

    @Override
    public void onActivityCreated(@Nullable Bundle savedInstanceState) {
        super.onActivityCreated(savedInstanceState);
        LogUtil.d("Frag2,onActivityCreated");
    }

    @Override
    public void onResume() {
        super.onResume();
        LogUtil.d("Frag2,onResume");
    }

    @Override
    public void onPause() {
        super.onPause();
        LogUtil.d("Frag2,onPause");
    }

    @Override
    public void onStop() {
        super.onStop();
        LogUtil.d("Frag2,onStop");
    }

    @Override
    public void onDestroy() {
        super.onDestroy();
        LogUtil.d("Frag2,onDestroy");
    }

    @Override
    public void onHiddenChanged(boolean hidden) {
        super.onHiddenChanged(hidden);
        LogUtil.d("Frag2,onHiddenChanged,hidden=" + hidden);
    }

    @Override
    public void setUserVisibleHint(boolean isVisibleToUser) {
        super.setUserVisibleHint(isVisibleToUser);
        LogUtil.d("Frag2,setUserVisibleHint,isVisibleToUser=" + isVisibleToUser);
    }
}
